using System;
using System.Windows.Forms;

namespace Company.Controls
{
    public partial class MessageBoxControl : Form
    {
        public string ReturnValue = "Cancel";
        public bool ShowYesNoButton
        {
            set { this.btnNo.Visible = this.btnYes.Visible = value; }
        }

        public string MessageString
        {
            set { this.txtMessage.Text = value; }
        }

        public MessageBoxControl()
        {
            InitializeComponent();
        }

        private void btnYes_Click(object sender, EventArgs e)
        {
            this.ReturnValue = "Yes";
            this.Close();
        }

        private void btnNo_Click(object sender, EventArgs e)
        {
            this.ReturnValue = "No";
            this.Close();
        }

        private void btnCancel_Click(object sender, EventArgs e)
        {
            this.Close();
        }
    }
}